package com.hyl.person;

import com.hyl.transport.*;

/**
 * @description:
 * @author: molar
 * @date: Created in 2020/5/18 10:11
 * @version: v1.0
 * @modified By:
 */
public class Person {
    private String id;
    private String name;
    private String sex;

    public void driveTransport(Aircraft aircraft){
        System.out.println("驾驶员:"+this.name+"("+this.id+")"+"  "+this.sex);
        aircraft.driveMethod();
        System.out.println("该座驾具体信息为："+aircraft.getTrId()+"  "+aircraft.getTrName());
    }

    public void driveTransport(Airship airship){
        System.out.println("驾驶员:"+this.name+"("+this.id+")"+"  "+this.sex);
        airship.driveMethod();
        System.out.println("该座驾具体信息为："+airship.getTrId()+"  "+airship.getTrName());
    }

    public void driveTransport(Automobile automobile){
        System.out.println("驾驶员:"+this.name+"("+this.id+")"+"  "+this.sex);
        automobile.driveMethod();
        System.out.println("该座驾具体信息为："+automobile.getTrId()+"  "+automobile.getTrName());
    }

    public void driveTransport(Bicycle bicycle){
        System.out.println("驾驶员:"+this.name+"("+this.id+")"+"  "+this.sex);
        bicycle.driveMethod();
        System.out.println("该座驾具体信息为："+bicycle.getTrId()+"  "+bicycle.getTrName());
    }

    public void driveTransport(HotAirBalloon hotAirBalloon){
        System.out.println("驾驶员:"+this.name+"("+this.id+")"+"  "+this.sex);
        hotAirBalloon.driveMethod();
        System.out.println("该座驾具体信息为："+hotAirBalloon.getTrId()+"  "+hotAirBalloon.getTrName());
    }

    public void driveTransport(Hovercraft hovercraft){
        System.out.println("驾驶员:"+this.name+"("+this.id+")"+"  "+this.sex);
        hovercraft.driveMethod();
        System.out.println("该座驾具体信息为："+hovercraft.getTrId()+"  "+hovercraft.getTrName());
    }

    public void driveTransport(Motocycle motocycle){
        System.out.println("驾驶员:"+this.name+"("+this.id+")"+"  "+this.sex);
        motocycle.driveMethod();
        System.out.println("该座驾具体信息为："+motocycle.getTrId()+"  "+motocycle.getTrName());
    }

    public void driveTransport(Ship ship){
        System.out.println("驾驶员:"+this.name+"("+this.id+")"+"  "+this.sex);
        ship.driveMethod();
        System.out.println("该座驾具体信息为："+ship.getTrId()+"  "+ship.getTrName());
    }

    public void driveTransport(Sumarine sumarine){
        System.out.println("驾驶员:"+this.name+"("+this.id+")"+"  "+this.sex);
        sumarine.driveMethod();
        System.out.println("该座驾具体信息为："+sumarine.getTrId()+"  "+sumarine.getTrName());
    }

    public Person() {
    }

    public Person(String id, String name, String sex) {
        this.id = id;
        this.name = name;
        this.sex = sex;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }
}
